import {createRouter, createWebHashHistory} from 'vue-router'

const routerHistory = createWebHashHistory();
const router = createRouter({
    history: routerHistory,
    routes: [
        {
            path: '/',
            redirect: '/lesson8'
        },
        {
            path: '/lesson1',
            title: '绘制地球效果',
            component: () => import('../view/lesson1/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson2',
            title: '绘制太阳和地球效果',
            component: () => import('../view/lesson2/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson3',
            title: '地球围绕太阳公转效果',
            component: () => import('../view/lesson3/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson4',
            title: '绘制地球围绕太阳公转轨道',
            component: () => import('../view/lesson4/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson5',
            title: '绘制太阳系各大行星',
            component: () => import('../view/lesson5/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson6',
            title: '绘制太阳系各大行星共享Geometry、 Material',
            component: () => import('../view/lesson6/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson7',
            title: '给星球添加文字标注',
            component: () => import('../view/lesson7/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
        {
            path: '/lesson8',
            title: '繁星点点的太阳系',
            component: () => import('../view/lesson8/index.vue'),
            meta: {
                requiresAuth: true
            }
        },
    ]
})
export default router
